import React, { Component } from 'react'
import {BrowserRouter,Switch,Redirect,Route} from "react-router-dom"
import Login from "../components/login"
import Detail from "../components/detail"
import Edit from "../components/edit"
import List from "../components/list"
import Registry from "../components/registry"
 export default function RootRouter(){
    return <BrowserRouter>
                <Switch>
                    <Route path="/login" render={(props)=>{
                        return <Login {...props}></Login>
                    }}></Route>
                    <Route path="/detail" component={Detail}></Route>
                    <Route path="/edit" component={Edit}></Route>
                    <Route path="/list" component={List}></Route>
                    <Route path="/registry" component={Registry}></Route>
                    <Redirect path="/" to="/login"></Redirect>
                </Switch>
            </BrowserRouter>
}

